| Conditions | 5 |
| Paths | 3 |
| Total Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | import {matcher} from 'feathers-commons/lib/utils' |
||
| 25 | install: function (Vue, options = {}) { |
||
| 26 | const extend = Vue.util.extend |
||
| 27 | // Deprecation Warning: 0.3 |
||
| 28 | // Deprecate: 0.4 |
||
| 29 | /* istanbul ignore next */ |
||
| 30 | if (options.driverOptions && options.driverOptions.feathers) { |
||
| 31 | if (process.env.NODE_ENV !== 'production') { |
||
| 32 | warn('Deprecation warning: driverOptions.feathers to be deprecated in favor of just feathers') |
||
| 33 | } |
||
| 34 | options.feathers = options.driverOptions.feathers |
||
| 35 | } |
||
| 36 | // Vue 2.0 has util.toObject, but 1.0 doesn't |
||
| 37 | options = extend(extend({}, defaults), options) |
||
| 38 | |||
| 39 | if (!('feathers' in options)) { |
||
| 40 | throw new Error('No feathers instance set in options') |
||
| 41 | } |
||
| 42 | |||
| 43 | Vue.$syncer = options |
||
| 44 | Vue.mixin(syncerMixin(Vue)) |
||
| 45 | // Mixin handling |
||
| 46 | Vue.config.optionMergeStrategies.sync = Vue.config.optionMergeStrategies.props |
||
| 47 | } |
||
| 48 | } |
||
| 49 |